#include "RBTree.h"
#include <time.h>


void test()
{
	int a[] = { 4, 2, 6, 1, 3, 5, 15, 7, 16, 14 };
	RBTree<int, int> rb;
	for (auto e : a)
	{
		rb.Insert(make_pair(e, e));
	}

	rb.InOrder();

	rb.isBalance();
}

void test2()
{
	srand((size_t)time(0));
	const size_t N = 1000000;
	RBTree<int, int> t;
	for (size_t i = 0; i < N; ++i)
	{
		size_t x = rand();
		t.Insert(make_pair(x, x));
	}
	cout << t.isBalance() << endl;
}

int main()
{
	test2();
}